using Microsoft.Xna.Framework.Content;

namespace Deferred.Library.Scene
{
    /// <summary>
    /// 
    /// </summary>
    public class Camera
    {
        [ContentSerializer(Optional = true)]
        private float cameraArc = -30;
        [ContentSerializer(Optional = true)]
        private float cameraDistance = 1000;

        /// <summary>
        /// 
        /// </summary>
        [ContentSerializer(Optional = true)]
        public float CameraRotation { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [ContentSerializerIgnore]
        public float CameraArc
        {
            get { return cameraArc; }
            set
            {
                cameraArc = value;

                // Limit the arc movement.
                if (cameraArc > 90.0f)
                    cameraArc = 90.0f;
                else if (cameraArc < -90.0f)
                    cameraArc = -90.0f;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [ContentSerializerIgnore]
        public float CameraDistance
        {
            get { return cameraDistance; }
            set
            {
                cameraDistance = value;

                // Limit the arc movement.
                if (cameraDistance > 11900.0f)
                    cameraDistance = 11900.0f;
                else if (cameraDistance < 10.0f)
                    cameraDistance = 10.0f;
            }
        }
    }
}


